/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.entity;

import org.hibernate.validator.constraints.Length;

import java.math.BigDecimal;
import java.util.List;
import com.jeesite.common.collect.ListUtils;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 产品档案Entity
 * @author HOHD
 * @version 2020-12-23
 */
@Table(name="st_product_record", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="product_name", attrName="productName", label="产品名称", queryType=QueryType.LIKE),
		@Column(name="product_code", attrName="productCode", label="产品编号"),
		@Column(name="product_quality", attrName="productQuality", label="产品性质"),
		@Column(name="product_type", attrName="productType", label="产品类型"),
		@Column(name="animal_category", attrName="animalCategory", label="动物种类"),
		@Column(name="raw_material_code", attrName="rawMaterialCode", label="原料编码"),
		@Column(name="percent_in", attrName="percentIn", label="比例"),
		@Column(name="model", attrName="model", label="型号"),
		@Column(name="number", attrName="number", label="序号"),
		@Column(name="custom_name", attrName="customName", label="客户名称", queryType=QueryType.LIKE),
		@Column(name="product_series", attrName="productSeries", label="产品系列"),
		@Column(name="pack_size", attrName="packSize", label="包装规格"),
		@Column(name="calc_unit", attrName="calcUnit", label="计量单位"),
		@Column(name="sup_unit", attrName="supUnit", label="辅助单位"),
		@Column(name="specification", attrName="specification", label="规格型号"),
		@Column(name="product_maker", attrName="productMaker", label="生产厂家"),
		@Column(name="default_warehouse", attrName="defaultWarehouse", label="默认仓位"),
		@Column(name="bar_code", attrName="barCode", label="条码号"),
		@Column(name="low_inventory", attrName="lowInventory", label="最低库存"),
		@Column(name="high_inventory", attrName="highInventory", label="最高库存"),
		@Column(name="reference_cost", attrName="referenceCost", label="参考成本"),
		@Column(name="reference_in_price", attrName="referenceInPrice", label="参考进价"),
		@Column(name="reference_out_price", attrName="referenceOutPrice", label="参考售价"),
		@Column(name="check_type", attrName="checkType", label="检验类型"),
		@Column(name="saved_type", attrName="savedType", label="保质期"),
		@Column(name="effect", attrName="effect", label="有效"),
		@Column(name="batch_manage", attrName="batchManage", label="批号管理"),
		@Column(name="approve_state", attrName="approveState", label="审批状态"),
		@Column(name="approve_man_code", attrName="approveManCode", label="审批人编码"),
		@Column(name="approve_man_name", attrName="approveManName", label="审批人", queryType=QueryType.LIKE),
		@Column(name="create_by", attrName="createBy", label="创建人", isUpdate=false, isQuery=false),
		@Column(name="create_date", attrName="createDate", label="创建时间", isUpdate=false, isQuery=false),
		@Column(name="update_by", attrName="updateBy", label="更新人", isQuery=false),
		@Column(name="update_date", attrName="updateDate", label="更新时间", isQuery=false),
	}, orderBy="a.update_date DESC"
)
public class StProductRecord extends DataEntity<StProductRecord> {
	
	private static final long serialVersionUID = 1L;
	private String productName;		// 产品名称
	private String productCode;		// 产品编号
	private Integer productQuality;		// 产品性质
	private String productType;		// 产品类型
	private String animalCategory;		// 动物种类
	private String rawMaterialCode;		// 原料编码
	private String percentIn;		// 比例
	private String model;		// 型号
	private Integer number;		// 序号
	private String customName;		// 客户名称
	private Integer productSeries;		// 产品系列
	private String packSize;		// 包装规格
	private String calcUnit;		// 计量单位
	private String supUnit;		// 辅助单位
	private String specification;		// 规格型号
	private Integer productMaker;		// 生产厂家
	private String defaultWarehouse;		// 默认仓位
	private String barCode;		// 条码号
	private BigDecimal lowInventory;		// 最低库存
	private BigDecimal highInventory;		// 最高库存
	private BigDecimal referenceCost;		// 参考成本
	private BigDecimal referenceInPrice;		// 参考进价
	private BigDecimal referenceOutPrice;		// 参考售价
	private Integer checkType;		// 检验类型
	private Integer savedType;		// 保质期
	private String effect;		// 有效
	private String batchManage;		// 批号管理
	private Integer approveState;		// 审批状态
	private String approveManCode;		// 审批人编码
	private String approveManName;		// 审批人
	private List<StFormula> stFormulaList = ListUtils.newArrayList();		// 子表列表
	private List<StFormulaName> stFormulaNameList = ListUtils.newArrayList();		// 子表列表
	
	public StProductRecord() {
		this(null);
	}

	public StProductRecord(String id){
		super(id);
	}
	
	@Length(min=0, max=20, message="产品名称长度不能超过 20 个字符")
	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}
	
	@Length(min=0, max=20, message="产品编号长度不能超过 20 个字符")
	public String getProductCode() {
		return productCode;
	}

	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}
	
	public Integer getProductQuality() {
		return productQuality;
	}

	public void setProductQuality(Integer productQuality) {
		this.productQuality = productQuality;
	}
	
	public String getProductType() {
		return productType;
	}

	public void setProductType(String productType) {
		this.productType = productType;
	}
	
	public String getAnimalCategory() {
		return animalCategory;
	}

	public void setAnimalCategory(String animalCategory) {
		this.animalCategory = animalCategory;
	}
	
	public String getRawMaterialCode() {
		return rawMaterialCode;
	}

	public void setRawMaterialCode(String rawMaterialCode) {
		this.rawMaterialCode = rawMaterialCode;
	}

	public String getPercentIn() {
		return percentIn;
	}

	public void setPercentIn(String percentIn) {
		this.percentIn = percentIn;
	}

	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}
	
	public Integer getNumber() {
		return number;
	}

	public void setNumber(Integer number) {
		this.number = number;
	}
	
	@Length(min=0, max=36, message="客户名称长度不能超过 36 个字符")
	public String getCustomName() {
		return customName;
	}

	public void setCustomName(String customName) {
		this.customName = customName;
	}
	
	public Integer getProductSeries() {
		return productSeries;
	}

	public void setProductSeries(Integer productSeries) {
		this.productSeries = productSeries;
	}
	
	@Length(min=0, max=10, message="包装规格长度不能超过 10 个字符")
	public String getPackSize() {
		return packSize;
	}

	public void setPackSize(String packSize) {
		this.packSize = packSize;
	}
	
	@Length(min=0, max=36, message="计量单位长度不能超过 36 个字符")
	public String getCalcUnit() {
		return calcUnit;
	}

	public void setCalcUnit(String calcUnit) {
		this.calcUnit = calcUnit;
	}
	
	@Length(min=0, max=36, message="辅助单位长度不能超过 36 个字符")
	public String getSupUnit() {
		return supUnit;
	}

	public void setSupUnit(String supUnit) {
		this.supUnit = supUnit;
	}
	
	@Length(min=0, max=20, message="规格型号长度不能超过 20 个字符")
	public String getSpecification() {
		return specification;
	}

	public void setSpecification(String specification) {
		this.specification = specification;
	}
	
	public Integer getProductMaker() {
		return productMaker;
	}

	public void setProductMaker(Integer productMaker) {
		this.productMaker = productMaker;
	}
	
	@Length(min=0, max=36, message="默认仓位长度不能超过 36 个字符")
	public String getDefaultWarehouse() {
		return defaultWarehouse;
	}

	public void setDefaultWarehouse(String defaultWarehouse) {
		this.defaultWarehouse = defaultWarehouse;
	}
	
	@Length(min=0, max=20, message="条码号长度不能超过 20 个字符")
	public String getBarCode() {
		return barCode;
	}

	public void setBarCode(String barCode) {
		this.barCode = barCode;
	}
	
	public BigDecimal getLowInventory() {
		return lowInventory;
	}

	public void setLowInventory(BigDecimal lowInventory) {
		this.lowInventory = lowInventory;
	}
	
	public BigDecimal getHighInventory() {
		return highInventory;
	}

	public void setHighInventory(BigDecimal highInventory) {
		this.highInventory = highInventory;
	}
	
	public BigDecimal getReferenceCost() {
		return referenceCost;
	}

	public void setReferenceCost(BigDecimal referenceCost) {
		this.referenceCost = referenceCost;
	}
	
	public BigDecimal getReferenceInPrice() {
		return referenceInPrice;
	}

	public void setReferenceInPrice(BigDecimal referenceInPrice) {
		this.referenceInPrice = referenceInPrice;
	}
	
	public BigDecimal getReferenceOutPrice() {
		return referenceOutPrice;
	}

	public void setReferenceOutPrice(BigDecimal referenceOutPrice) {
		this.referenceOutPrice = referenceOutPrice;
	}
	
	public Integer getCheckType() {
		return checkType;
	}

	public void setCheckType(Integer checkType) {
		this.checkType = checkType;
	}
	
	public Integer getSavedType() {
		return savedType;
	}

	public void setSavedType(Integer savedType) {
		this.savedType = savedType;
	}
	
	public String getEffect() {
		return effect;
	}

	public void setEffect(String effect) {
		this.effect = effect;
	}
	
	public String getBatchManage() {
		return batchManage;
	}

	public void setBatchManage(String batchManage) {
		this.batchManage = batchManage;
	}
	
	public Integer getApproveState() {
		return approveState;
	}

	public void setApproveState(Integer approveState) {
		this.approveState = approveState;
	}
	
	@Length(min=0, max=20, message="审批人编码长度不能超过 20 个字符")
	public String getApproveManCode() {
		return approveManCode;
	}

	public void setApproveManCode(String approveManCode) {
		this.approveManCode = approveManCode;
	}
	
	@Length(min=0, max=5, message="审批人长度不能超过 5 个字符")
	public String getApproveManName() {
		return approveManName;
	}

	public void setApproveManName(String approveManName) {
		this.approveManName = approveManName;
	}
	
	public List<StFormula> getStFormulaList() {
		return stFormulaList;
	}

	public void setStFormulaList(List<StFormula> stFormulaList) {
		this.stFormulaList = stFormulaList;
	}
	
	public List<StFormulaName> getStFormulaNameList() {
		return stFormulaNameList;
	}

	public void setStFormulaNameList(List<StFormulaName> stFormulaNameList) {
		this.stFormulaNameList = stFormulaNameList;
	}
	
}